#!/bin/sh

if [ -f %OPTWARE_TARGET_PREFIX%/etc/ipkg.conf ] ;  then
	if ( grep -q ".* unslung" %OPTWARE_TARGET_PREFIX%/etc/ipkg.conf ) ; then
		sed -i -e "/.* unslung/d" %OPTWARE_TARGET_PREFIX%/etc/ipkg.conf
	fi

	if ( grep -q ".* wl500g" %OPTWARE_TARGET_PREFIX%/etc/ipkg.conf ) ; then
		sed -i -e "/.* wl500g/d" %OPTWARE_TARGET_PREFIX%/etc/ipkg.conf
	fi
	
	rm -rf %OPTWARE_TARGET_PREFIX%/lib/ipkg/lists/unslung
	rm -rf %OPTWARE_TARGET_PREFIX%/lib/ipkg/lists/wl500g
fi
